<%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2021/5/7
  Time: 14:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Update</title>
    <meta charset="UTF-8">
    <style>
        form table tr td{
            text-align: center;
        }
        img {
            max-height: 70px;
            max-width: 70px;
        }
        input[type="file"]{
            max-width: 167px;
        }
    </style>
</head>
<body>
<form action="user?method=update" method="post" enctype="multipart/form-data">
    <table>
        <tr>
            <td>用&nbsp;户&nbsp;名:</td>
            <td><input type="text" name="username" readonly="readonly" value="${user.username}"></td>
        </tr>
        <tr>
            <td>密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码:</td>
            <td><input type="text" name="password" readonly="readonly" value="${user.password}"></td>
        </tr>
        <tr>
            <td>真实姓名:</td>
            <td><input type="text" name="realname" value="${user.realname}"></td>
        </tr>
        <tr>
            <td>头&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;像:</td>
            <td><input type="file" name="img" ></td>
            <td><img src="img?username=${username}"></td>
        </tr>
        <tr>
            <td>邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;箱:</td>
            <td><input type="email" name="email" value="${user.email}"></td>
        </tr>
        <tr>
            <td>电&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;话:</td>
            <td><input type="tel" name="phone" value="${user.phone}"></td>
        </tr>
        <tr>
            <td>来&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;源:</td>
            <td><input type="text" name="source" value="${user.source}"></td>
        </tr>
        <tr>
            <td><input type="submit" value="修改"></td>
        </tr>
    </table>
    <input type="text" hidden="hidden" name="currentImg" value="${user.imgurl}">
</form>
<div style="color: red">${err}</div>
</body>
</html>
